<template>
	<view class="v-home-page" :style="{ '--bg-image': `url(${ materialBg})` }">
		<view :style="{ height: navTop + 'px' }"></view>

		<view class="flex-start-center margin-bottom_30rpx" style="color:#333333" @click="localFn()">

			<uni-icons style="margin-top: 7rpx;" color="#333333" type="left" size="20"></uni-icons>
			<text style="color: 333333;font-size: 33rpx;"> 克隆类型</text>
		</view>


		<view class="" v-for="(item,index) in bg" :key="index">

			<image class="imageBackground" :src="item.pic_url" mode="" @click="navGo(index)"></image>

		</view>




	</view>
</template>

<script>
	export default {
		data() {
			return {
				navTop: '',
				materialBg: this.$imgs.violet,
				bg: []

			}
		},
		onLoad() {
			const app = getApp();
			this.navTop = app.globalData.navTop;
			this.typeListtFn()


		},
		computed: {


		},
		methods: {
			async typeListtFn() {

				const result = await this.$http.get({
					url: this.$api.typeList,
					data: {
						uid: uni.getStorageSync('uid'),
					}
				});
				if (result.errno == 0) {
					console.log(result.data)
					this.bg = result.data
				} else {

					this.$sun.toast(result.message)
				}

			},

			localFn() {
				this.$sun.navBack()
			},
			navGo(index) {
				if (index == 0) {
					console.log('ces1')
					// this.$sun.navGo('/pages/digitalHuman/cloneList')
					this.$sun.navGo('/pagesA/creatCenter/digitalHumanSynthesis/digitalHumanSynthesis')


				} else {
					this.$sun.navGo('/pages/digitalHuman/soundCloning')
				}
			}

		}
	}
</script>

<style lang="less">
	.v-home-page {
		background-image: (var(--bg-image));
		background-repeat: no-repeat;
		background-size: contain;
		position: relative;
		height: 100vh;
		padding: 20rpx;
		position: relative;

		.imageBackground {

			/* 矩形 5658 */
			width: 710rpx;
			height: 266rpx;
			margin-bottom: 20rpx;

		}
	}
</style>